export default function flatten (obj,arr){
  if (obj.children&&obj.children.length>0){
      for (let i = 0; i < obj.children.length; i++){
        let a = obj.children[i]
        a.parent = {
          username:obj.username,
          content:obj.content,
          avatar:obj.avatar
        }
        arr.push(a)
        flatten(obj.children[i],arr)
      }
  }
}